package com.migo.utils;

import java.util.Random;

/**
 * Created by Administrator on 2017/6/10 0010.
 */
public class IDUtils {

    public static long genItemId(){
        long millis = System.currentTimeMillis();

        Random random = new Random();
        int end2 = random.nextInt(99);
        String str = millis + String.format("%02d",end2);
        long id = new Long(str);
        return id;
    }

    public static void main(String[] args) {
        for(int i=0;i<10;i++){
            System.out.println(genItemId());
        }
    }
}
